<template>
<div>
	<hr />
	<div>内置修饰符</div>
	<input type="text" v-model.trim="mainData.name1" />
	<div>{{mainData.name1}}</div>
    <input type="text" v-model.number="mainData.name2" />
	<div>{{mainData.name2}}</div>
	<input type="text" v-model.lazy="mainData.name3" />
	<div>{{mainData.name3}}</div>
	<hr />
	<Vmodel3Child v-model:name4.test1="mainData.name4"></Vmodel3Child>
	<div>{{mainData.name4}}</div>
	<Vmodel3Child2 v-model.test2="mainData.name5"></Vmodel3Child2>
	<div>{{mainData.name5}}</div>
</div>
</template>
<script>
import Vmodel3Child from '/@/compositionAPI/vmodels/Vmodel3Child.vue'
import Vmodel3Child2 from '/@/compositionAPI/vmodels/Vmodel3Child2.vue'

import { reactive } from "vue";
export default {
	name: 'Vmodel3',
	components: {
		Vmodel3Child,
		Vmodel3Child2,
    },
	setup () {
		const mainData = reactive({
			name1: '11',
			name2: '22',
			name3: '33',
			name4: '44',
			name5: '55',
		});

		return {
			mainData,
		}
	},
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
</style>